package com.meida.module.bus.client.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.NoArgsConstructor;

/**
 * 学霸任务中心筛选状态
 *
 * @author gp
 * @date 2021/8/9
 */
@NoArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ApiModel("学霸任务中心筛选状态")
public enum ScholarTyrantOrderSearchStateEnum {
    /**
     * 订单状态
     */
    orderDetailState0(0, "全部"),
    orderDetailState1(1, "待作答"),
    orderDetailState2(2, "待审核"),
    orderDetailState3(3, "审核通过"),
    orderDetailState4(4, "审核失败"),
    orderDetailState5(5, "已出价"),
    orderDetailState6(6, "待上课"),
    orderDetailState7(7, "上课中"),
    orderDetailState8(8, "售后处理");

    @EnumValue
    private Integer value;
    private String label;

    ScholarTyrantOrderSearchStateEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }


    public void setValue(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static ScholarTyrantOrderSearchStateEnum getByValue(Integer value) {
        for (ScholarTyrantOrderSearchStateEnum orderDetailStateEnum : values()) {
            if (orderDetailStateEnum.getValue() == value) {
                return orderDetailStateEnum;
            }
        }
        return null;
    }
}
